package com.maxd.service.selfOrder;

import com.maxd.bean.order.DeductPointRes;
import com.maxd.bean.order.PointPayReq;
import com.maxd.error.Result;
import com.maxd.model.Orders;
import com.maxd.model.SelfGoodsVirtual;
import com.maxd.utils.excel.ExcelData;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface OrdersService {
    //列表
    Result findAll(Integer page, Integer size, String orderNum, String status, Integer orderType, String title,String mobile,Long storeId,Integer isExpress,String startTime, String endTime);

    ExcelData listExcel(String orderNum, String status, Integer orderType, String title,String mobile,Long storeId,Integer isExpress,String startTime, String endTime);

    //我的订单
    Result findMyList(Integer page, Integer size, String userId, String status);

    //我的售后订单接口
    Result findMyRefundList(Integer page, Integer size, String userId);

    //查询
    Result findOne(Long id);

    //删除
    Result delete(Long id);

    //添加
    Result saveBody(Orders entity);

    //多订单添加
    Result saveAll(List<Orders> list);

    //修改
    Result updateBody(Orders entity);

    //收入
    Result income(String data, int way, Long storeId);

    //订单数统计
    Result statistical(String data, Long storeId);

    //取消订单
    Result orderCancel(Long id);

    //后台管理去发货
    Result express(Long id, String expressName, String expressNumber);

    Result expressVirtual(Long id);

    //确认收货
    Result orderConfirm(Long id);

    //检测完成支付
    Result checkPay(Long id);

    //根据订单查询订单
    Orders findByOrderNum(String orderNum);

    //根据支付单号查询多个订单
    List<Orders> findByPayNum(String payNum);

    //零钱支付
    Result changePay(String id);

    //积分支付
    Result jiFenPay(String id);

    void pointPay(PointPayReq req);

    //用户申请退款
    Result refund(Long id, String refund);

    //退款到余额
    Result refundMoney(Long id);

    //后台管理拒绝退款
    Result refusedRefund(Long ordersId, String refusedRefund);

    /**
     * 订单分销
     * @param ordersId
     */
    void fenXiao(Long ordersId);

    //后台管理待处理订单
    Result pendingOrder();

    //提醒发货
    Result remind(Long ordersId);

    //后台管理被提醒发货
    Result remindOrder(Long merchantId);

    //拼团订单处理
    void pink(Orders orders);

    //用户订单支付统计
    Result payCount(Long userId);

    //处理虚拟商品
    SelfGoodsVirtual sendExpress(Orders orders);

    //用户端订单统计
    Result count(Long userId);

    //查快递
    Result findExpress(String expressNumber);

    //核销订单
    Result isExpress(String orderNum);

    //购物车订单取消处理
    void cancel(List<Orders> list);

    List<Orders> findEffectByUserId(Long userId, Long typeId);

    DeductPointRes queryDeductPoint(Long goodsId);
}
